package caras;

import java.io.FileReader;
import java.util.Locale;

import javax.speech.Central;
import javax.speech.EngineList;
import javax.speech.EngineModeDesc;
import javax.speech.recognition.Recognizer;
import javax.speech.recognition.RecognizerModeDesc;
import javax.speech.recognition.ResultAdapter;
import javax.speech.recognition.RuleGrammar;


public class RecognizerMultimedia extends ResultAdapter {

	public static void main(String[] args) { 
		try {
			
			System.out.println(Locale.getDefault());
			
			Central.createRecognizer(new EngineModeDesc(Locale.ENGLISH));
			
			//RecognizerModeDesc desc = new RecognizerModeDesc(Locale.getDefault(), Boolean.TRUE);
			//Recognizer recognizer = Central.createRecognizer(desc);
			
			EngineList disponibles=Central.availableRecognizers(null);
			
			System.out.println(disponibles.size());
			
			for (Object objeto : disponibles) {
			    EngineModeDesc descripcion = null;
			    
			    System.out.println("Nombre: "+descripcion.getEngineName());
			    System.out.println("Idioma: "+descripcion.getLocale());
			    System.out.println("Moda: "+descripcion.getModeName());
			    System.out.println("---------------------");
			}
			System.out.println(disponibles.size()+" encontrado");
			
		//	Recognizer recognizer = Central.createRecognizer(null);
			

		} catch (Exception e) {
			e.printStackTrace();
		}
}
}